namespace PickGold.Charting.Design
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Drawing.Design;

    [Editor(typeof(ColorExtendedEditor), typeof(UITypeEditor))]
    internal class ColorExtended
    {
        private Color _color;

        public ColorExtended()
        {
        }

        public ColorExtended(Color color)
        {
            this._color = color;
        }

        public override string ToString()
        {
            string str = new ColorConverter().ConvertToInvariantString(this._color);
            if (!string.IsNullOrEmpty(str))
            {
                return str;
            }
            return Color.Empty.Name;
        }

        [Editor(typeof(ChartColorEditor), typeof(UITypeEditor))]
        public Color Value
        {
            get
            {
                return this._color;
            }
            set
            {
                this._color = value;
            }
        }
    }
}

